package com.appbee.cm.client.nav.presenter;

import java.util.ArrayList;
import java.util.List;

import com.appbee.cm.shared.data.NavItemProxy;

public class NavItemWrap
{
	private NavItemWrap parent;
	private NavItemProxy wrappedItem;

	private List<NavItemWrap> children = new ArrayList<NavItemWrap>();
	private NavDataProvider navDataProvider;

	public NavItemWrap(NavItemProxy wrappedItem)
	{
		this.wrappedItem = wrappedItem;
	}

	public NavItemWrap getParent()
	{
		return parent;
	}

	public void setParent(NavItemWrap parent)
	{
		this.parent = parent;
	}

	public String getName()
	{
		return wrappedItem.getName();
	}

	public void setName(String name)
	{
		wrappedItem.setName(name);
	}

	public String getPath()
	{
		return wrappedItem.getPath();
	}

	public void setPath(String path)
	{
		wrappedItem.setPath(path);
	}

	public NavItemProxy getWrappedItem()
	{
		return wrappedItem;
	}

	public void setWrappedItem(NavItemProxy wrappedItem)
	{
		this.wrappedItem = wrappedItem;
	}

	public List<NavItemWrap> getChildren()
	{
		return children;
	}

	public void setChildren(List<NavItemWrap> children)
	{
		this.children = children;
	}

	public NavDataProvider getNavDataProvider()
	{
		return navDataProvider;
	}

	public void setNavDataProvider(NavDataProvider navDataProvider)
	{
		this.navDataProvider = navDataProvider;
		navDataProvider.setData(children);
	}

}
